package com.itheima.stream02;

import java.util.HashMap;
import java.util.Set;

public class Nest {
    public static void main(String[] args) {
        //创建HashMap集合，Key值存学号，Value值存姓名
        HashMap<String, String> hashMap1 = new HashMap<>();
        hashMap1.put("001", "李晨");
        hashMap1.put("002", "范冰冰");
        HashMap<String, String> hashMap2 = new HashMap<>();
        hashMap2.put("001", "马云");
        hashMap2.put("002", "马化腾");
        //创建HashMap集合，Key值存班级，Value值存集合
        HashMap<String, HashMap<String, String>> hashMap = new HashMap<>();
        hashMap.put("Java基础班", hashMap1);
        hashMap.put("Java就业班", hashMap2);
        Set<String> ket1 = hashMap.keySet();
        for (String s : ket1) {
            System.out.println(s+"：");
            HashMap<String, String> hashMap3 = hashMap.get(s);
            hashMap3.forEach((k,v)-> System.out.println(k+"   "+v));
        }


    }
}
